package com.wpx.Mapper;

import com.wpx.Pojo.Article;
import com.wpx.Pojo.PageVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface ArticleMapper {
    List<Article> getArticleList(PageVO pageVO);

    Integer getArticleTotal(PageVO pageVO);

    @Update("update Article.article set status=#{status} where id=#{id} ")
    void updateStatus(Integer id, Integer status);


    void saveArticle(Article article);

    @Select("select *from article where id=#{id}")
    Article getById(Integer id);
}
